/*** 
 * @Author: LVGRAPE
 * @Date: 2023-11-09 10:18:33
 * @LastEditTime: 2023-11-15 11:07:41
 * @LastEditors: LVGRAPE
 * @Description: 
 * @FilePath: \zino_fc_v0\zino\power\pwr.h
 * @要啥没啥，爱咋咋的
 */

#ifndef __PWR_H_
#define __PWR_H_
#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus
#include <stdint.h>

typedef enum { OFF = 0, ON = !OFF }pwr_state_t;
typedef void (*hb_key_action_callback_t)(uint8_t times);
typedef void (*hb_key_longpress_callback_t)(void);

void zino_hardware_pwr(pwr_state_t new_state);
void ex_5v_ctrl(pwr_state_t new_state);
void pwrKey_action_add(hb_key_action_callback_t cb);
void pwrKey_longPress_action_attach(hb_key_longpress_callback_t cb);

uint16_t zino_get_vbat(void);
uint16_t zino_get_v5(void);
uint16_t zino_get_m1(void);
uint16_t zino_get_m2(void);
uint16_t zino_get_m3(void);
uint16_t zino_get_m4(void);

void pwrLedHandle(void *p);

#ifdef __cplusplus
}
#endif // __cplusplus
#endif
